

@RestController
@RequestMapping("/sysPhoneTextMessage")
public class SysPhoneTextMessageController {

    @Resource
    private SysPhoneTextMessageService sysPhoneTextMessageService;


    /**
     * 获取 SysPhoneTextMessage 分页列表
     */
    @GetMapping("/pagination")
    public Ret getSysPhoneTextMessagePagination( PaginationVo paginationVo, SysPhoneTextMessageQuery sysPhoneTextMessageQuery ) throws Exception {
        IPage page = sysPhoneTextMessageService.getSysPhoneTextMessagePagination(paginationVo, sysPhoneTextMessageQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 SysPhoneTextMessage 所有数据
     */
    @GetMapping("/all")
    public Ret getSysPhoneTextMessageAllList( SysPhoneTextMessageQuery sysPhoneTextMessageQuery ) throws Exception {
        List<SysPhoneTextMessageEntity> list = sysPhoneTextMessageService.getSysPhoneTextMessageAllList( sysPhoneTextMessageQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 SysPhoneTextMessage 详情
    */
   @GetMapping("/{id}")
   public Ret getSysPhoneTextMessageDetail(@PathVariable Long id) throws Exception {

       SysPhoneTextMessageEntity sysPhoneTextMessage = sysPhoneTextMessageService.getSysPhoneTextMessageDetail(id);
       return Ret.ok(sysPhoneTextMessage);
   }


    /**
     * 新增 SysPhoneTextMessage
     * */
    @PostMapping("")
    public Ret addSysPhoneTextMessage(@RequestBody SysPhoneTextMessageVo sysPhoneTextMessageVo) throws Exception {

        sysPhoneTextMessageService.addSysPhoneTextMessage(sysPhoneTextMessageVo);
        return Ret.ok();
    }


    /**
     * 更新 SysPhoneTextMessage
     * */
    @PutMapping("")
    public Ret updateSysPhoneTextMessage(@RequestBody SysPhoneTextMessageVo sysPhoneTextMessageVo) throws Exception {

        sysPhoneTextMessageService.updateSysPhoneTextMessage(sysPhoneTextMessageVo);
        return Ret.ok();
    }


    /**
     * 删除 SysPhoneTextMessage
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveSysPhoneTextMessage( @RequestBody List<Long> ids ) throws Exception {

        sysPhoneTextMessageService.batchRemoveSysPhoneTextMessage(ids);
        return Ret.ok();
    }
}

  